﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="allProfiles.aspx.vb" Inherits="myWebsite.myProfile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1">
        <Columns>
            <asp:TemplateField HeaderText="Name" SortExpression="FirstName">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("FirstName") %>'></asp:Label>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("SecondName") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("FirstName") %>'></asp:TextBox>
                </EditItemTemplate>
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:BoundField DataField="OwnedBike" HeaderText="Owned Bike" 
                SortExpression="OwnedBike" >
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="ModificationSpecialty" 
                HeaderText="Modification Specialty" 
                SortExpression="ModificationSpecialty" >
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:ImageField DataImageUrlField="ProfilePicture" HeaderText="Profile Picture">
                <ControlStyle Height="200px" Width="250px" />
                <HeaderStyle HorizontalAlign="Center" />
            </asp:ImageField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MotorcyclesConn %>" 
        ProviderName="<%$ ConnectionStrings:MotorcyclesConn.ProviderName %>" 
        SelectCommand="SELECT [Username], [FirstName], [SecondName], [OwnedBike], [ModificationSpecialty], [ProfilePicture] FROM [UserAccounts]">
    </asp:SqlDataSource>
</asp:Content>
